//
//  UserPageManager.h
//  JiuKuGospel
//
//  Created by jiukuyinyue on 15-8-10.
//  Copyright (c) 2015年 JiuKuForApp. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LCSingleton.h"

#define _UserM ([UserPageManager sharedInstance])
#define LOGINSUCCESSFUL @"LOGINSUCCESSFUL"

@class UserPageViewController;
@interface UserPageManager : NSObject

@property (nonatomic, strong)UserPageViewController * userPageVC;

@property (nonatomic, assign)BOOL isLogin;
@property (nonatomic, strong)NSString * systemNumber;//记录系统通知数
@property (nonatomic, strong)NSString * noticeNumber;//记录通知数
//后台记录的sys_not_read
@property (nonatomic, strong)NSString * sys_not_read;
//后台记录的msg_not_read
@property (nonatomic, strong)NSString * msg_not_read;

@property (nonatomic, strong)NSString * userName;
@property (nonatomic, strong)NSString * userImageUrl;
@property (nonatomic, strong)NSString * userID;
@property (nonatomic, strong)NSString * usercode;           //用户识别码
@property (nonatomic, copy)NSString * mobileNum;           //手机号码
@property (nonatomic, copy)NSString * credit;//福音数量
@property (nonatomic, assign) NSInteger readingTime; //阅读时间
@property (strong, nonatomic) void(^getReadTimeBlock)(NSInteger);

@property (nonatomic, assign) NSInteger timingCloseingTimeNum; //定时关闭剩余时间
@property (strong, nonatomic) void(^timingCloseingTimeBlock)(NSInteger);
@property (nonatomic, assign) NSInteger selectedRow; //选择第几个定时关闭
@property (nonatomic, strong)NSString * mbcode_md5;
@property (nonatomic, strong)NSString * groupid;            //用户等级
@property (nonatomic, strong)NSString * salt;               //密码状态
@property (nonatomic, strong)NSString * play_notenjoy;      //允许播放不喜欢的歌曲
@property (nonatomic, strong)NSString * play_qlty;          //播放音质
@property (nonatomic, strong)NSString * signin;             //签到状态
@property (nonatomic, strong)NSString * qiandao;            //签到
@property (nonatomic, strong)NSMutableDictionary * qiandaoDic;            //签到new

@property (nonatomic, assign)NSInteger countHS;


@property (nonatomic, strong)NSString * WIFIStr;            //是否仅wifi下联网
@property (nonatomic, strong)NSString * playLoveStr;        //允许播放不喜欢歌曲
@property (nonatomic, strong)NSString * musicYinzhi;        //播放音质
@property (nonatomic, assign)BOOL isWIFIPlay;         //根据是否联网控制播放


@property (nonatomic, assign)BOOL isUpdate;     //是否切换歌曲数据

//加密
@property (nonatomic, strong)NSString * accesskey;            //授权加密key
@property (nonatomic, strong)NSString * times;            //授权加密时间戳
@property (nonatomic, strong)NSString * Newaccesskey;            //授权加密key 不带code
@property (nonatomic, strong)NSString * Newtimes;            //授权加密时间戳不带code

INTERFACE_SINGLETON(UserPageManager)

- (void)saveUserMessages;
- (void)getUserMessages;
- (void)clearUserMessages;

#pragma mark -  定时关闭 setup  -
///创建定时关闭
- (void)setupTimingCloseingTime;

//获取加密字符串
- (void)hmacSHA256ShouQuanJiamiWithUserCode:(NSString *)userCode;
- (NSString *)hmac:(NSString *)data withKey:(NSString *)key;

- (NSString*)dictionaryToJson:(NSDictionary *)dic;
#pragma mark - 九酷福音  发现更多  商城
+ (NSString *)getUrlStrMove;
#pragma mark - 不带code的加密
- (void)NewhmacSHA256ShouQuanJiamiWithUserCode:(NSString *)userCode;
@end
